<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen" th:href="@{/webjars/jquery-ui/jquery-ui.min.css}" />
<link rel="stylesheet" type="text/css" media="screen" th:href="@{/webjars/jqGrid/css/ui.jqgrid.css}" />
<link rel="stylesheet" type="text/css" media="screen" th:href="@{/webjars/artDialog/skins/simple-star.css}" />
<link rel="stylesheet" type="text/css" media="screen" th:href="@{/webjars/star/css/buttons.css}" />
<link rel="stylesheet" type="text/css" media="screen" th:href="@{/webjars/star/css/pageList.css}" />
<script type="text/javascript" th:src="@{/webjars/jquery/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/webjars/jquery-ui/jquery-ui.min.js}"></script>
<script type="text/javascript" th:src="@{/webjars/jqGrid/js/jquery.jqGrid.js}"></script>
<script type="text/javascript" th:src="@{/webjars/jqGrid/js/i18n/grid.locale-cn.js}"></script>
<script type="text/javascript" th:src="@{/webjars/artDialog/js/jquery.artDialog.js}"></script>
<script type="text/javascript" th:src="@{/webjars/artDialog/js/iframeTools.js}"></script>
<style type="text/css">
.data-container div:first-child{
    margin-bottom: 10px;
    border-bottom: 1px solid lightgray;
}
.data-container div:nth-child(2){
    margin-left: 3px;
}
</style>
</head>
<body>
	<div class="main-container data-container" id="main-container">
		<div></div>
		<div></div>
	</div>
	<script type="text/javascript" th:src="@{/webjars/star/js/star.list.comm.js}"></script>
	<script type="text/javascript" th:inline="javascript">
	var basePath="/";
	var params = artDialog.data("params");
	$(function(){
		$("#main-container div:first").html(params.name+"拥有的角色:")
		$.ajax({
			url: basePath+"role/viewRole/"+params.userId,
			type: 'post',
			dataType: 'json',
			success: function(res){
				if(res.code==0){
					var roles=res.data;
					var html="";
					for(var o in roles){
						html+="<span>"+roles[o].roleRemark+"</span>";
					}
					$("#main-container div:last").html(html);
				}else{
					artDialog.alert(res.msg)
				}
			}
		});
	});
	</script>
</body>
</html>